<template>
  <el-checkbox v-model="value" @change="(value) => $emit('change', value)"></el-checkbox>
</template>

<script>
export default {
    props: ['defaultValue'],
    data() {
        return {
            value: false,
        };
    },
    mounted() {
        this.value = this.defaultValue;
    },
    watch: {
        defaultValue(val) {
            this.value = val;
        }
    }
}
</script>

<style>

</style>